Optimal. Leaf size=155 \[ \frac {35 a \tanh ^{-1}(\sin (c+d x))}{8 d}-\frac {b \cot ^2(c+d x)}{2 d}-\frac {35 a \csc (c+d x)}{8 d}-\frac {35 a \csc ^3(c+d x)}{24 d}+\frac {3 b \log (\tan (c+d x))}{d}+\frac {7 a \csc ^3(c+d x) \sec ^2(c+d x)}{8 d}+\frac {a \csc ^3(c+d x) \sec ^4(c+d x)}{4 d}+\frac {3 b \tan ^2(c+d x)}{2 d}+\frac {b \tan ^4(c+d x)}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.11, antiderivative size = 155, normalized size of antiderivative = 1.00, number of steps
used = 11, number of rules used = 8, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.296, Rules used = {2913, 2701,
294, 308, 213, 2700, 272, 45} \begin {gather*} -\frac {35 a \csc ^3(c+d x)}{24 d}-\frac {35 a \csc (c+d x)}{8 d}+\frac {35 a \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {a \csc ^3(c+d x) \sec ^4(c+d x)}{4 d}+\frac {7 a \csc ^3(c+d x) \sec ^2(c+d x)}{8 d}+\frac {b \tan ^4(c+d x)}{4 d}+\frac {3 b \tan ^2(c+d x)}{2 d}-\frac {b \cot ^2(c+d x)}{2 d}+\frac {3 b \log (\tan (c+d x))}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 213
Rule 272
Rule 294
Rule 308
Rule 2700
Rule 2701
Rule 2913
Rubi steps
\begin {align*} \int \csc ^4(c+d x) \sec ^5(c+d x) (a+b \sin (c+d x)) \, dx &=a \int \csc ^4(c+d x) \sec ^5(c+d x) \, dx+b \int \csc ^3(c+d x) \sec ^5(c+d x) \, dx\\ &=-\frac {a \text {Subst}\left (\int \frac {x^8}{\left (-1+x^2\right )^3} \, dx,x,\csc (c+d x)\right )}{d}+\frac {b \text {Subst}\left (\int \frac {\left (1+x^2\right )^3}{x^3} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {a \csc ^3(c+d x) \sec ^4(c+d x)}{4 d}-\frac {(7 a) \text {Subst}\left (\int \frac {x^6}{\left (-1+x^2\right )^2} \, dx,x,\csc (c+d x)\right )}{4 d}+\frac {b \text {Subst}\left (\int \frac {(1+x)^3}{x^2} \, dx,x,\tan ^2(c+d x)\right )}{2 d}\\ &=\frac {7 a \csc ^3(c+d x) \sec ^2(c+d x)}{8 d}+\frac {a \csc ^3(c+d x) \sec ^4(c+d x)}{4 d}-\frac {(35 a) \text {Subst}\left (\int \frac {x^4}{-1+x^2} \, dx,x,\csc (c+d x)\right )}{8 d}+\frac {b \text {Subst}\left (\int \left (3+\frac {1}{x^2}+\frac {3}{x}+x\right ) \, dx,x,\tan ^2(c+d x)\right )}{2 d}\\ &=-\frac {b \cot ^2(c+d x)}{2 d}+\frac {3 b \log (\tan (c+d x))}{d}+\frac {7 a \csc ^3(c+d x) \sec ^2(c+d x)}{8 d}+\frac {a \csc ^3(c+d x) \sec ^4(c+d x)}{4 d}+\frac {3 b \tan ^2(c+d x)}{2 d}+\frac {b \tan ^4(c+d x)}{4 d}-\frac {(35 a) \text {Subst}\left (\int \left (1+x^2+\frac {1}{-1+x^2}\right ) \, dx,x,\csc (c+d x)\right )}{8 d}\\ &=-\frac {b \cot ^2(c+d x)}{2 d}-\frac {35 a \csc (c+d x)}{8 d}-\frac {35 a \csc ^3(c+d x)}{24 d}+\frac {3 b \log (\tan (c+d x))}{d}+\frac {7 a \csc ^3(c+d x) \sec ^2(c+d x)}{8 d}+\frac {a \csc ^3(c+d x) \sec ^4(c+d x)}{4 d}+\frac {3 b \tan ^2(c+d x)}{2 d}+\frac {b \tan ^4(c+d x)}{4 d}-\frac {(35 a) \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\csc (c+d x)\right )}{8 d}\\ &=\frac {35 a \tanh ^{-1}(\sin (c+d x))}{8 d}-\frac {b \cot ^2(c+d x)}{2 d}-\frac {35 a \csc (c+d x)}{8 d}-\frac {35 a \csc ^3(c+d x)}{24 d}+\frac {3 b \log (\tan (c+d x))}{d}+\frac {7 a \csc ^3(c+d x) \sec ^2(c+d x)}{8 d}+\frac {a \csc ^3(c+d x) \sec ^4(c+d x)}{4 d}+\frac {3 b \tan ^2(c+d x)}{2 d}+\frac {b \tan ^4(c+d x)}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 3 in
optimal.
time = 0.49, size = 90, normalized size = 0.58 \begin {gather*} -\frac {a \csc ^3(c+d x) \, _2F_1\left (-\frac {3}{2},3;-\frac {1}{2};\sin ^2(c+d x)\right )}{3 d}-\frac {b \left (2 \csc ^2(c+d x)+12 \log (\cos (c+d x))-12 \log (\sin (c+d x))-4 \sec ^2(c+d x)-\sec ^4(c+d x)\right )}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.26, size = 147, normalized size = 0.95
method | result | size |
derivativedivides | \(\frac {a \left (\frac {1}{4 \sin \left (d x +c \right )^{3} \cos \left (d x +c \right )^{4}}-\frac {7}{12 \sin \left (d x +c \right )^{3} \cos \left (d x +c \right )^{2}}+\frac {35}{24 \sin \left (d x +c \right ) \cos \left (d x +c \right )^{2}}-\frac {35}{8 \sin \left (d x +c \right )}+\frac {35 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+b \left (\frac {1}{4 \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )^{4}}+\frac {3}{4 \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )^{2}}-\frac {3}{2 \sin \left (d x +c \right )^{2}}+3 \ln \left (\tan \left (d x +c \right )\right )\right )}{d}\) | \(147\) |
default | \(\frac {a \left (\frac {1}{4 \sin \left (d x +c \right )^{3} \cos \left (d x +c \right )^{4}}-\frac {7}{12 \sin \left (d x +c \right )^{3} \cos \left (d x +c \right )^{2}}+\frac {35}{24 \sin \left (d x +c \right ) \cos \left (d x +c \right )^{2}}-\frac {35}{8 \sin \left (d x +c \right )}+\frac {35 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+b \left (\frac {1}{4 \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )^{4}}+\frac {3}{4 \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )^{2}}-\frac {3}{2 \sin \left (d x +c \right )^{2}}+3 \ln \left (\tan \left (d x +c \right )\right )\right )}{d}\) | \(147\) |
risch | \(-\frac {i \left (105 a \,{\mathrm e}^{13 i \left (d x +c \right )}+70 a \,{\mathrm e}^{11 i \left (d x +c \right )}+72 i b \,{\mathrm e}^{12 i \left (d x +c \right )}-329 a \,{\mathrm e}^{9 i \left (d x +c \right )}+72 i b \,{\mathrm e}^{10 i \left (d x +c \right )}-204 a \,{\mathrm e}^{7 i \left (d x +c \right )}-192 i b \,{\mathrm e}^{8 i \left (d x +c \right )}-329 a \,{\mathrm e}^{5 i \left (d x +c \right )}+192 i b \,{\mathrm e}^{6 i \left (d x +c \right )}+70 a \,{\mathrm e}^{3 i \left (d x +c \right )}-72 i b \,{\mathrm e}^{4 i \left (d x +c \right )}+105 a \,{\mathrm e}^{i \left (d x +c \right )}-72 i b \,{\mathrm e}^{2 i \left (d x +c \right )}\right )}{12 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{3} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}+\frac {35 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{8 d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b}{d}-\frac {35 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{8 d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) b}{d}+\frac {3 b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}\) | \(291\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 151, normalized size = 0.97 \begin {gather*} \frac {3 \, {\left (35 \, a - 24 \, b\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (35 \, a + 24 \, b\right )} \log \left (\sin \left (d x + c\right ) - 1\right ) + 144 \, b \log \left (\sin \left (d x + c\right )\right ) - \frac {2 \, {\left (105 \, a \sin \left (d x + c\right )^{6} + 36 \, b \sin \left (d x + c\right )^{5} - 175 \, a \sin \left (d x + c\right )^{4} - 54 \, b \sin \left (d x + c\right )^{3} + 56 \, a \sin \left (d x + c\right )^{2} + 12 \, b \sin \left (d x + c\right ) + 8 \, a\right )}}{\sin \left (d x + c\right )^{7} - 2 \, \sin \left (d x + c\right )^{5} + \sin \left (d x + c\right )^{3}}}{48 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 248, normalized size = 1.60 \begin {gather*} -\frac {210 \, a \cos \left (d x + c\right )^{6} - 280 \, a \cos \left (d x + c\right )^{4} + 42 \, a \cos \left (d x + c\right )^{2} - 144 \, {\left (b \cos \left (d x + c\right )^{6} - b \cos \left (d x + c\right )^{4}\right )} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) \sin \left (d x + c\right ) - 3 \, {\left ({\left (35 \, a - 24 \, b\right )} \cos \left (d x + c\right )^{6} - {\left (35 \, a - 24 \, b\right )} \cos \left (d x + c\right )^{4}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) \sin \left (d x + c\right ) + 3 \, {\left ({\left (35 \, a + 24 \, b\right )} \cos \left (d x + c\right )^{6} - {\left (35 \, a + 24 \, b\right )} \cos \left (d x + c\right )^{4}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) \sin \left (d x + c\right ) - 12 \, {\left (6 \, b \cos \left (d x + c\right )^{4} - 3 \, b \cos \left (d x + c\right )^{2} - b\right )} \sin \left (d x + c\right ) + 12 \, a}{48 \, {\left (d \cos \left (d x + c\right )^{6} - d \cos \left (d x + c\right )^{4}\right )} \sin \left (d x + c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.64, size = 160, normalized size = 1.03 \begin {gather*} \frac {3 \, {\left (35 \, a - 24 \, b\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) - 3 \, {\left (35 \, a + 24 \, b\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) + 144 \, b \log \left ({\left | \sin \left (d x + c\right ) \right |}\right ) + \frac {6 \, {\left (18 \, b \sin \left (d x + c\right )^{4} - 11 \, a \sin \left (d x + c\right )^{3} - 44 \, b \sin \left (d x + c\right )^{2} + 13 \, a \sin \left (d x + c\right ) + 28 \, b\right )}}{{\left (\sin \left (d x + c\right )^{2} - 1\right )}^{2}} - \frac {8 \, {\left (33 \, b \sin \left (d x + c\right )^{3} + 18 \, a \sin \left (d x + c\right )^{2} + 3 \, b \sin \left (d x + c\right ) + 2 \, a\right )}}{\sin \left (d x + c\right )^{3}}}{48 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 11.91, size = 157, normalized size = 1.01 \begin {gather*} \frac {\ln \left (\sin \left (c+d\,x\right )+1\right )\,\left (\frac {35\,a}{16}-\frac {3\,b}{2}\right )}{d}-\frac {\ln \left (\sin \left (c+d\,x\right )-1\right )\,\left (\frac {35\,a}{16}+\frac {3\,b}{2}\right )}{d}+\frac {3\,b\,\ln \left (\sin \left (c+d\,x\right )\right )}{d}-\frac {\frac {35\,a\,{\sin \left (c+d\,x\right )}^6}{8}+\frac {3\,b\,{\sin \left (c+d\,x\right )}^5}{2}-\frac {175\,a\,{\sin \left (c+d\,x\right )}^4}{24}-\frac {9\,b\,{\sin \left (c+d\,x\right )}^3}{4}+\frac {7\,a\,{\sin \left (c+d\,x\right )}^2}{3}+\frac {b\,\sin \left (c+d\,x\right )}{2}+\frac {a}{3}}{d\,\left ({\sin \left (c+d\,x\right )}^7-2\,{\sin \left (c+d\,x\right )}^5+{\sin \left (c+d\,x\right )}^3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________